from app import create_app, db
from gevent.pywsgi import WSGIServer
from app.sql_operate import create_test_statics
print("进入主文件")
app = create_app()  # 细节实现部分已经被封装
print("已退出create_app，开始dbcreate_all")
db.drop_all()
db.create_all()
print("已创建数据库")
create_test_statics()
print("已填充测试数据")
# Debug/Development
# app.run(debug=True, host="0.0.0.0", port="5000")
# Production
# http_server = WSGIServer(('0.0.0.0', 8001), app)
# http_server.serve_forever()
